package gu.simplemq.activemq;

import java.util.Properties;

import javax.jms.JMSException;
import javax.jms.Message;

import org.apache.activemq.pool.PooledConnectionFactory;

import gu.simplemq.IMessageQueueFactory;
import gu.simplemq.MQPropertiesHelper;
import gu.simplemq.MessageQueueType;
import gu.simplemq.jms.JmsRuntimeContext;

public class MQContextImpl implements JmsRuntimeContext{
	private final ActivemqRuntimeContext context = ActivemqRuntimeContext.ACTIVEMQ_CONTEXT;
	
	@Override
	public final MessageQueueType getMessageQueueType() {
		return context.getMessageQueueType();
	}
	@Override
	public final String getClientImplType() {
		return context.getClientImplType();
	}
	@Override
	public MQPropertiesHelper getPropertiesHelper() {
		return context.getPropertiesHelper();
	}
	@Override
	public PooledConnectionFactory createPooledConnectionFactory(Properties properties) {
		return context.createPooledConnectionFactory(properties);
	}
	@Override
	public String destNameOf(Message message) throws JMSException {
		return context.destNameOf(message);
	}
	@Override
	public IMessageQueueFactory getMessageQueueFactory() {
		return context.getMessageQueueFactory();
	}

}
